console.log("Number('123') =",Number("123")); // 123
console.log("Number('123.1') =",Number("123.1")); // 123.1
console.log("Number(123n) =",Number(123n)); // 123

// 需要注意的是，如果字符串不是一个“完整的”数值，结果也是NaN
console.log("Number('123n') =",Number("123n")); // NaN
console.log("Number('123我') =",Number('123我')); // NaN

console.log("Number(true) =",Number(true)); // 1
console.log("Number(false) =",Number(false)); // 0

// null的结果是0
console.log("Number(null) =",Number(null)); // 1
// undefined的结果是undefined
console.log("Number(undefined) =",Number(undefined)); // NaN

// 注意：数组的情况比较特殊
console.log("Number([99]) =",Number([99])); // 99
console.log("Number([true]) =",Number([true])); // 1
console.log("Number(['99']) =",Number(['99'])); // 99
console.log("Number([]) =",Number([])); // 0
console.log("Number([99,98]) =",Number([99,98])); // NaN

// 转换对象时都是NaN
console.log("Number({value:99}) =",Number({value:99})); // NaN
console.log("Number({}) =",Number({})); // NaN
